import request from '@/utils/request'

// 查询股票申购委托列表
export function listStockApply(query) {
  return request({
    url: '/invest/stockApply/list',
    method: 'get',
    params: query
  })
}

// 查询股票申购委托详细
export function getStockApply(id) {
  return request({
    url: '/invest/stockApply/' + id,
    method: 'get'
  })
}

// 根据发行人id查询对应投资人
export function selectDividendStockList(query) {
  return request({
    url: '/invest/stockApply/selectDividendStockList',
    method: 'get',
    params: query
  })
}

// 新增股票申购委托
export function addStockApply(data) {
  return request({
    url: '/invest/stockApply',
    method: 'post',
    data: data
  })
}

// 修改股票申购委托
export function updateStockApply(data) {
  return request({
    url: '/invest/stockApply',
    method: 'put',
    data: data
  })
}

// 删除股票申购委托
export function delStockApply(id) {
  return request({
    url: '/invest/stockApply/' + id,
    method: 'delete'
  })
}

// 查询股票申购委托详细
export function confirmStockApply(id) {
  return request({
    url: '/invest/stockApply/confirm/' + id,
    method: 'get'
  })
}
